package com.dcy.daily.skill.jvm.memoryAlloc.toolsOfJvm;

/**
 * HSDIS:JIT 生成代码反汇编，P176,jdk8
 * @author duanchunyu
 * @version 1.0.0
 * @createTime 2021年07月22日 21:42
 */
public class HSDIS_Usage {
    int a = 1;
    static int b = 2;

    public int sum(int c){
        return a + b + c;
    }

    /**
     *单独使用HSDIS工具的运行时参数：
     *  -XX:+UnlockDiagnosticVMOptions -XX:+PrintAssembly -Xcomp -XX:CompileCommand=dontinline,*HSDIS_Usage.sum -XX:CompileCommand=compileonly,*HSDIS_Usage.sum
     *HSDIS+JIT运行时参数：
     * -XX:+UnlockDiagnosticVMOptions -XX:+PrintAssembly -XX:+TraceClassLoading -XX:+LogCompilation -XX:LogFile=D:\logfile.log
     *
     * @param args
     */
    public static void main(String[] args) {
        new HSDIS_Usage().sum(3);
    }
}
